/**
 * 据说 >>> 1 应该比 /2 性能好
 * @ClassName: OperateDiv
 * @Description: TODO
 * @author zhaoweiyong yyd
 * @date 2017年6月9日 上午11:22:05 *
 */
public class OperateDiv {

	
	/*public void OperateDivTraditional();
    Code:
       # 将一个8位带符号整数压入栈->6到栈顶
       0: bipush        6
       #  将int类型值存入局部变量1->high = 6
       2: istore_1
       #  将int类型常量0压入栈
       3: iconst_0
       #  0放到第二个常量 -> low=0
       4: istore_2
       #  从局部变量2中装载int类型值->0到栈顶
       5: iload_2
       #  从局部变量1中装载int类型值->6到栈顶
       6: iload_1
       #  栈顶元素相加,放到栈顶->6放到栈顶
       7: iadd
       #  将int类型常量2压入栈
       8: iconst_2
       #  栈顶两个元素相除
       9: idiv
       #  栈顶元素放到middle中
       10: istore_3
       #  返回
       11: return*/
	public void OperateDivTraditional() {
		int high = 6;
		int low = 0;
		int middle = (low + high) / 2;
	}
	
	/*public void OperateDivBinary();
    Code:
       0: bipush        6
       2: istore_1
       3: iconst_0
       4: istore_2
       5: iload_2
       6: iload_1
       7: iadd
       8: iconst_1
       # 执行int类型的向右逻辑移位操作
       9: iushr
      10: istore_3
      11: return
	}*/
	public void OperateDivBinary() {
		int high = 6;
		int low = 0;
		int middle = (low + high) >>> 1;
	}

}
